package com.hilin.hilinim.netty.ws;//package com.hilin.hilinim.netty.ws.amqp;

import com.hilin.common.util.EntityUtils;
import com.hilin.entity.vo.MsgInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;

@Slf4j
@Component
public class WsMsgReceive {


    public void onMessage(String msg) {
        log.info("收到消息 {}", msg);
        MsgInfoVo msgInfo = EntityUtils.jsonStr2Entity(msg, MsgInfoVo.class);
        if (ObjectUtils.isEmpty(msgInfo)
                || ObjectUtils.isEmpty(msgInfo.getMsgInfoPo())) {
            return;
        }
        // todo 消息发送处理
    }
}
